import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';

@Injectable({
  providedIn: 'root'
})
export class HairShellService {

  serviceUrls: any = {
    phoneShellListUrl: '/adzRedPacketInfo/list', // 发手机壳列表
    phoneShellDetailUrl: '/adzRedPacketDetails/list', // 发手机壳详情
    phoneUseDetailUrl: '/adzRedPacketTextureRecord/list', // 使用详情
  };

  constructor(
    public httpClient: HttpClient
  ) { }

  /**
   * 查询发手机壳列表
   * @param params 
   * @returns 
   */
  getPhoneShellList(params: any) {
    return this.httpClient.post(this.serviceUrls.phoneShellListUrl, params).toPromise();
  }

  /**
   * 查询发手机壳详情
   * @param params 
   * @returns 
   */
  getPhoneShellDetail(params: any) {
    return this.httpClient.post(this.serviceUrls.phoneShellDetailUrl, params).toPromise();
  }

  /**
   * 查询发手机壳使用详情
   * @param params 
   * @returns 
   */
  getPhoneUseDetail(params: any) {
    return this.httpClient.post(this.serviceUrls.phoneUseDetailUrl, params).toPromise();
  }
}
